package cn.sns.addfriend;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class Util {
	public static String getId(String source) {
		String id = "";
		String patternString = "/home/\\?uid=(\\d+)";
		Pattern pattern = Pattern.compile(patternString,
				Pattern.CASE_INSENSITIVE);
		Matcher matcher = pattern.matcher(source);
		if (matcher.find()) {
			id = matcher.group(1);
			// System.out.println(id);
		}
		return id;
	}
}
